.#{$ns}TagControl {
  position: relative;

  &-input.is-focused {
    border-radius: 0;
  }

  &-input.is-disabled {
    border-style: dashed;
    background: transparent;
  }

  &.is-inline {
    display: inline-block;
  }

  > .#{$ns}TagControl-popover {
    // box-shadow: none;
    padding: 0;
    border: none;
    width: 100%;
    margin-top: $Form-select-popoverGap - $Form-select-outer-borderWidth;

    &.#{$ns}PopOver--leftBottomLeftTop {
      top: 100% !important;
    }

    &.#{$ns}PopOver--leftTopLeftBottom {
      top: auto !important;
      bottom: 100% !important;
    }
  }

  &-sug {
    margin-top: $Form-input-marginBottom;

    &Tip {
      color: $TagControl-sugTip-color;
      margin-bottom: $Form-input-marginBottom;
    }

    &Item {
      margin-right: $gap-sm;
      margin-bottom: $gap-sm;
      display: inline-block;
      font-size: $TagControl-sugBtn-fontSize;
      cursor: pointer;
      user-select: none;
      border: $TagControl-sugBtn-borderWidth solid transparent;

      @include button-size(
        $TagControl-sugBtn-paddingY,
        $TagControl-sugBtn-paddingX,
        $TagControl-sugBtn-fontSize,
        $TagControl-sugBtn-lineHeight,
        $TagControl-sugBtn-borderRadius,
        $TagControl-sugBtn-height
      );

      @include button-variant(
        $TagControl-sugBtn-bg,
        $TagControl-sugBtn-border,
        $TagControl-sugBtn-color,
        $TagControl-sugBtn-onHover-bg,
        $TagControl-sugBtn-onHover-border,
        $TagControl-sugBtn-onHover-color,
        $TagControl-sugBtn-onActive-bg,
        $TagControl-sugBtn-onActive-border,
        $TagControl-sugBtn-onActive-color
      );

      &.is-disabled {
        pointer-events: none;
        opacity: $Button-onDisabled-opacity;
      }
    }
  }
}

.#{$ns}TagControl-popover {
  &.#{$ns}PopOver--leftBottomLeftTop > .#{$ns}ListMenu {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
  }

  &.#{$ns}PopOver--leftTopLeftBottom > .#{$ns}ListMenu {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }
}
